<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .parent{
            width: 500px;
            height: 300px;
            background-color: red;
            display:grid;
            grid-template-columns: 1fr 1fr 1fr;
            grid-template-rows: 200px;
            justify-items: center;
            align-items: center;
        }
        .item{
            width: 100px;
            height: 100px;
            border: 1px solid #333;
        }
        /* 单独设置元素在单元格中的位置 */
        .one{
            justify-self: start;
            align-self: start;
        }
    </style>
</head>
<body>
    <div class="parent">
        <div class="item one">

        </div>
        <div class="item">
            
        </div>
        <div class="item">
            
        </div>
    </div>
</body>
</html>